Date: Mon, 11 Nov 1996 17:13:18 GMT
Server: NCSA/1.5
Content-type: text/html
Last-modified: Wed, 11 Sep 1996 21:37:48 GMT
Content-length: 3481

<HTML>
<HEAD>
<TITLE>Program 1 - CS 302 Fall 1996 - Section 4</TITLE>
</HEAD>
<BODY>

<H1 ALIGN=CENTER>
  <!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><A HREF="http://www.cs.wisc.edu/~cs302">CS 302</A>
  Fall 1996 - <!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><A HREF="http://www.cs.wisc.edu/~milo/cs302.html">Section 4</A>
</H1> 
<H2 ALIGN=CENTER>Algebraic Language Programming in C++</H2>
<H4 ALIGN=CENTER>Instructor: 
  <!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><A HREF="http://www.cs.wisc.edu/~milo">Milo M. Martin</A> 
  (milo@cs.wisc.edu)</H4>
<hr><br>

<H1 ALIGN=CENTER>Program 1</H1>
<H3 ALIGN=CENTER>Due Wednesday, September 18, 1996</H3> 
<hr><br>

<P>
In program 1 you will be writing your first program. You may write on 
your program to execute <B>one</B> of the following three formulas:<br>
<UL>
<LI>Conversion from degrees Celsius to degrees Farenheit<BR>
<I>F = ((9.0/5.0)*C)+32</I>
<LI>Conversion from degrees Farenheit to degrees Celsius<BR>
<I>C = (F-32)*(5.0/9.0)</I>
<LI>The volume of a sphere<BR>
<I>V = (4.0/3.0)*PI*r<SUP>3</SUP></I>
</UL>

For this assignment, all input comes from the keyboard and output is sent
to the display.  Remember to prompt for and read the necessary input
variables.  It is also a good idea to check your results with a calculator
to make sure you don't have any logic errors!  The calculations should be
done using <TT>double</TT> variable types.  The answers should be
displayed only with a reasonable number of decimal places. <p>

You should use your <TT>U:\PROGRAMS\PROG1</TT> directory to hold the 
files for this assignment. <p>

<B>Turn in the assignment following the guidelines given in <!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><A HREF=
"http://www.cs.wisc.edu/~milo/cs302/turnin.html">Turning in Assignments</A>. </B> Turn into me a print out of
your code and a number of test runs.  Staple all of your pages together. 
See below on how to print out your output.  To avoid mixing up your output
with others, at the beginning of your program, have it print your name and 
section using <TT>cout</TT>. 

<H3>Commenting Your Program:</H3>
<P>
Comments are required for this and all subsequent programs.  They are used to
document your program, but are ignored by the compiler.  As you develop your
program, comments are added for clarification and explanation.  In C++ comments
follow after // and continue only to the end of the line.  You may also use C
comments, which are between /* and */ and can span several lines.  Comments are
found at the top of the program, including:
<P>
<ul>
  <li>Your name
  <li>CS302, section 4
  <li>Instructor: Milo Martin
  <li>Program number
  <li>Due date
  <li>A general description of the program
  - This description should tell what the program does and how to use
  it.  Also mention any limitations, unresolved bugs, or special features
  of the program. 
  </ul>

In the code place comments: <ul> <li> After any constants or variables for
which it would not be clear what they are used for to someone who does not
know what the program does. 

<li>To label and briefly explain the main steps of the algorithm with 
comments. 

<li>By any unclear or convoluted code to explain it's purpose. 
</ul>
<p>

<H3>Printing Your Output</H3>

After your program has finished is should say "inactive" at the top of the
output window.  When it says this, click on the upper lefthand corner of
the window to activate a pull down menu.  Select <B>Print</B> from this
menu, then click ok. 

<hr>

<ADDRESS>
Created by
<!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><A HREF = "http://www.cs.wisc.edu/~dyao/cs302.html">Dan Yao</A>
, <!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><A HREF = "http://www.cs.wisc.edu/~dzimm/cs302.html">Dave Zimmermann</A>
& <!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><A HREF="http://www.cs.wisc.edu/~milo">Milo Martin</A>
</ADDRESS>

</BODY>
</HTML>
